import React,{useState} from 'react'

export default function App() {
        const [mun, setMun] = useState(0)
        const[isHot,setIsHot] =useState(true)
        const[person,setPerson]=useState(['44','55','66','77'])
    const setCountHandle = () =>{
        setMun(mun + 1) 
    }
        console.log("组件被重新渲染了");
  return (
    <div>
          <h1>累加的值是{mun}</h1>
      <h2>天气真的{isHot ? "热啊" : "冷a"}</h2>
      <button onClick={setCountHandle}>累加</button>
      <button onClick={() => { setIsHot(!isHot) }}>修改天气</button>
      {
        person.map(item =>{
            <li>{item}</li>
        })
      }
    </div>
  )
}
